package admin.service;

import admin.repository.CaseRepository;
import common.model.Case;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.Date;
import java.util.List;

@Service
public class CaseService {

    @Autowired
    private CaseRepository caseRepository;

    public List<Case> findCases(String lawyerName, String userName, Date date, Boolean completed) {
        return caseRepository.findByLawyerNameAndUserNameAndDateAndCompleted(lawyerName, userName, date, completed);
    }
}